/**
 * Created by oneminute on 2014/5/18.
 */

var lz = require("../utils/modules")();

function Account(_opts) {
    lz.Persistent.call(this, _opts);
    if (!_opts) _opts = {};
    this.__properties.pushArray([
        { name: "id", value: _opts.id || "" },
        { name: "uid", value: _opts.uid || "" },
        { name: "account", value: _opts.account || "" },
        { name: "publisher", value: _opts.publisher || 0 },
        { name: "key", value: _opts.key || null }
    ]);
    this.__initProperties();
    this.__collection = lz.Config.db.arango.accounts;
    this.__aql = lz.Config.db.arango.aqls.GET_OBJECT_BY_PROPERTY;
}

require("util").inherits(Account, lz.Persistent);

exports = module.exports = Account;
